<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="com.systop.ltbook.webapp.LtConstants, java.util.Map, java.util.List, com.systop.cms.model.Articles, com.systop.cms.model.Catalogs" %>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>中国校校通</title>
  <%@include file="/pages/new/resources.jsp" %>
  <style type="text/css">
  	.tktitle{
  		text-align: center;
  		font-size: 13px;
  		height: 25px;
  		font-weight: bold;
  		line-height: 25px;
  		background-image: url("${ctx}/images/lt_new/tt_bg.gif");
  	}
  	.tkdiv{
  		width: 236px;
  		height: 30px;
  		line-height: 30px;
  	}
  </style>
</head>
<body>
<table width="1002" height="40" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td background="${ctx}/images/lt_new/class_t_bg3.gif">
      <table width="1002" height="40" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="111" align="center" style="color: #000;">
            <b>${catalogName}</b>
          </td>
          <td width="890" align="right" style="padding-right:40px; font-weight: bold;">
          <%
          	Map<String, Object> data = (Map<String, Object>)request.getAttribute("data");
          	List<Catalogs> subs = (List)data.get(LtConstants.SUB_CATALOGS);
          	if (subs != null){
          	for(Catalogs cata :subs){
          %>
            &nbsp;&nbsp;<a href="${ctx}/tiku/index.do?rootPath=<%=cata.getRootPath()%>" style="color: green;" title="<%=cata.getName() %>" target="_blank"><%=cata.getName() %></a>&nbsp;&nbsp;
          <% }}%>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="994" height="360" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="774" valign="top" style="padding-top:3px; ">
       <%
	       List<Articles> xxtks = (List)data.get(LtConstants.XXTK);
	       List<Articles> cztks = (List)data.get(LtConstants.CZTK);
	       List<Articles> gztks = (List)data.get(LtConstants.GZTK);
       %>
      <table width="768" align="right" cellpadding="0" cellspacing="0" style="border:1px solid #E6E6E6;"> 
        <tr>
          <td width="256" height="347" valign="top" style="border-right:1px solid #E6E6E6;"> 
          	<div class="tktitle">小&nbsp;学&nbsp;题&nbsp;库</div>
          	<div style="padding: 5px 10px;">
          	  <%
          	    if (xxtks != null){
                  for(int i =0; i < xxtks.size(); i++){ 
              %>
                <div class="tkdiv">
                <div style="float: left; width: 14px; text-align: right; font-weight: bold;"><%=i+1%>.</div>&nbsp;
                <a href="${ctx}/ltart/view.do?model.id=<%=xxtks.get(i).getId()%>" title="<%=xxtks.get(i).getShortTitle()%>" target="_blank"><%=xxtks.get(i).getShortTitle()%></a></div>
              <% }} %>
          	</div>
          </td>
           <td width="256" height="347" valign="top" style="border-right:1px solid #E6E6E6;"> 
          	<div class="tktitle">初&nbsp;中&nbsp;题&nbsp;库</div>
          	<div style="padding: 5px 10px;">
          	  <%
          	    if (cztks != null){
                  for(int i =0; i < cztks.size(); i++){ 
              %>
                <div class="tkdiv">
                <div style="float: left; width: 14px; text-align: right; font-weight: bold;"><%=i+1%>.</div>&nbsp;
                <a href="${ctx}/ltart/view.do?model.id=<%=cztks.get(i).getId()%>" title="<%=cztks.get(i).getShortTitle()%>" target="_blank"><%=cztks.get(i).getShortTitle()%></a></div>
              <% }} %>
          	</div>
          </td>
           <td width="256" height="347" valign="top"> 
          	<div class="tktitle">高&nbsp;中&nbsp;题&nbsp;库</div>
          	<div style="padding: 5px 10px;">
          	  <%
          	    if (gztks != null){
                  for(int i =0; i < gztks.size(); i++){ 
              %>
                <div class="tkdiv">
                <div style="float: left; width: 14px; text-align: right; font-weight: bold;"><%=i+1%>.</div>&nbsp;
                <a href="${ctx}/ltart/view.do?model.id=<%=gztks.get(i).getId()%>" title="<%=gztks.get(i).getShortTitle()%>" target="_blank"><%=gztks.get(i).getShortTitle()%></a></div>
              <% }} %>
          	</div>
          </td>
        </tr>
      </table>
    </td>
    <td width="220" valign="top">
	  <table width="218" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="36"  align="center" background="${ctx}/images/lt_new/right_bg.gif" class="greenfont">
            &nbsp;热门精选题库&nbsp;
          </td>
        </tr>
        <tr>
          <td height="300" valign="top" background="${ctx}/images/lt_new/right_2.gif">
            <table width="190" height="284" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="270" valign="top">
                 <%
                   List<Articles>onTops = (List)data.get(LtConstants.ONTOP_ARTICLES);
                   if (onTops != null) {
                   int count = 0;
                   for(Articles art : onTops){ 
                	   count ++ ;
                 %>
                      <div class="orderdiv">
			            <div style="float: left; width: 14px; text-align: right; font-weight: bold;"><%=count%>.</div>
			            <div style="float:right;" class="shotBookTitle" title="<%=art.getShortTitle()%>">
			            <a href="${ctx}/ltart/view.do?model.id=<%=art.getId()%>" target="_blank"><%=art.getShortTitle()%></a></div>
                      </div>
	              <% } }%>
                </td>
              </tr>
            </table>
            <div style="text-align: right; padding:5px 15px 0px 0px;">更多...</div>
            <table width="218" height="14" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                 <td width="218" height="14" background="${ctx}/images/lt_new/right_3.gif"></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
</body>
</html>